package com.workManager.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;

/**
 * Created by Thinkpad on 2017/1/11 0011.
 */
public abstract class AbstractBaseRedisDao<K,V> {

    @Autowired
    protected RedisTemplate<K,V> redisTemplate;

    public void setRedisTemplate(RedisTemplate<K,V> redisTemplate){
        this.redisTemplate = redisTemplate;
    }

    protected RedisSerializer<String> getRedisSerializer() {
        return redisTemplate.getStringSerializer();
    }

}
